package net.dgg.rz.common.constant;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @className ModuleCodeConstant
 * @Author Quanlin Wan
 * @Description //TODO
 * @Date 2019/1/10 11:53
 **/
public class ModuleCodeConstant {
    public static final String RZSC_ALLOTORDER_CODE = "RZSC_ALLOTORDER_CODE";//融资生产-待分配生产订单
    public static final String RZSC_ALLOTRECORD_CODE = "RZSC_ALLOTRECORD_CODE";//融资生产-已分配记录
    public static final String RZSC_AUDITORDER_CODE = "RZSC_AUDITORDER_CODE";//融资生产-待审核生产订单
    public static final String RZSC_ALLORDER_CODE = "RZSC_ALLORDER_CODE";//融资生产-全部生产订单
    public static final String RZSC_ALLO_WORK_LOAD_CODE = "RZSC_ALLORDER_CODE";//融资生产-全部外勤工作量
    public static final String RZSC_BUSDEPORDER_CODE = "RZSC_BUSDEPORDER_CODE";//融资生产-事业部生产订单
    public static final String RZSC_PROCESSING_CODE = "RZSC_PROCESSING_CODE";//融资生产-处理中生产订单
    public static final String RZSC_COMPLETE_CODE = "RZSC_COMPLETE_CODE";//融资生产-已完成生产订单
    public static final String RZSC_ABNORMALORDER_CODE = "RZSC_ABNORMALORDER_CODE";//融资生产-异常生产订单
    public static final String RZSC_ORDER_DEPT_DATA = "RZSC_ORDER_DEPT_DATA";//融资生产-生产工作台
    public static final String RZSC_PRODUCT_CODE = "RZSC_PRODUCT_CODE";//融资生产-生产订单
    //app版本新增
    public static final String RZSC_APP_WORKBENCH = "RZSC_APP_WORKBENCH";//融资生产-APP首页
    //1.0.3版本新增
    public static final String RZSC_STATISTICAL_CODE = "RZSC_STATISTICAL_CODE";//融资生产-汇总统计报表
    public static final String RZSC_PRODUCT_DETAILED = "RZSC_PRODUCT_DETAILED";//融资生产-生产明细数据
    public static final String RZSC_ROYALTY_CODE = "RZSC_ROYALTY_CODE";//融资生产-部门提成数据权限
    public static final String RZSC_COMPLETE_CUSTOMER_CODE = "RZSC_COMPLETE_CUSTOMER_CODE";//融资生产-成单客户



    public static final Map<String, Object> relationField;    //节点更新展示隐藏关系映射

    public static final Map<String, String> paymentMethod;     //还款方式
    public static final List<Map> paymentMethodList;     //还款方式

    public static final Map<String, String> interestType;     //产权性质
    public static final Map<String, String> refundType;     //按揭/全款

    //金额验证正则
    public static final String REGEX_AMOUNT = "(^[1-9]([0-9]+)?(\\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\\.[0-9]([0-9])?$)";     //验证小数点后两位金额


    static {
        relationField = new HashMap<>();
        relationField.put("1", "评估公司");
        relationField.put("2", "评估价格");
        relationField.put("3", "征信状况（好/差）");
        relationField.put("4", "申请金额");
        relationField.put("5", "签申请时间");
        relationField.put("6", "报审时间");
        relationField.put("7", "通过时间");
        relationField.put("8", "通过金额");
        relationField.put("9", "结案银行");
        relationField.put("10", "注销时间");
        relationField.put("11", "办抵押时间");
        relationField.put("12", "取他权时间");
        relationField.put("13", "放款时间");
        relationField.put("14", "放款时长");
        relationField.put("15", "还款到期日");
        relationField.put("16", "还款时间");
        relationField.put("17", "还款计划表");
        relationField.put("18", "后台结算金额");
        relationField.put("19", "渠道返点");
        relationField.put("20", "对外返点");
        relationField.put("21", "每期还款金额/月");
        relationField.put("22", "解除抵押");
        relationField.put("23", "估车");
        relationField.put("24", "放款金额");
        relationField.put("25", "资金用途");
        relationField.put("26", "产权性质");
        relationField.put("27", "地址");
        relationField.put("28", "面积");
        relationField.put("29", "按揭/全款");

        paymentMethod = new HashMap<>();
        paymentMethod.put("1", "分期还款");
        paymentMethod.put("2", "其他");
        paymentMethod.put("3", "先息后本");
        paymentMethod.put("4", "等额等息");
        paymentMethod.put("5", "等额本金");
        paymentMethod.put("6", "等本等息");
        paymentMethod.put("7", "减本减息");
        paymentMethod.put("8", "计划归还");

        paymentMethodList = new ArrayList<>();
        paymentMethodList.add(new HashMap(){{
            put("typeCode", "1");
            put("name", "分期还款");
            put("inputType", "input");
            put("required", "true");
            put("validateReg", "maxLength");
//            put("validateData", "80");
        }});
        paymentMethodList.add(new HashMap(){{
            put("typeCode", "2");
            put("name", "其他");
            put("inputType", "input");
            put("required", "true");
            put("validateReg", "maxLength");
//            put("validateData", "80");
        }});
        paymentMethodList.add(new HashMap(){{
            put("typeCode", "3");
            put("name", "先息后本");
            put("inputType", "timeSelect");
            put("required", "true");
            put("validateReg", "");
            put("validateData", "");
        }});
        paymentMethodList.add(new HashMap(){{
            put("typeCode", "4");
            put("name", "等额等息");
            put("inputType", "timeSelect");
            put("required", "true");
            put("validateReg", "");
            put("validateData", "");
        }});
        paymentMethodList.add(new HashMap(){{
            put("typeCode", "5");
            put("name", "等额本金");
            put("inputType", "timeSelect");
            put("required", "true");
            put("validateReg", "");
            put("validateData", "");
        }});
        paymentMethodList.add(new HashMap(){{
            put("typeCode", "6");
            put("name", "等本等息");
            put("inputType", "timeSelect");
            put("required", "true");
            put("validateReg", "");
            put("validateData", "");
        }});
        paymentMethodList.add(new HashMap(){{
            put("typeCode", "7");
            put("name", "减本减息");
            put("inputType", "timeSelect");
            put("required", "true");
            put("validateReg", "");
            put("validateData", "");
        }});
        paymentMethodList.add(new HashMap(){{
            put("typeCode", "8");
            put("name", "计划归还");
            put("inputType", "input");
            put("required", "true");
            put("validateReg", "maxLength");
//            put("validateData", "80");
        }});
        interestType = new HashMap<>();
        interestType.put("1","住宅");
        interestType.put("2","商铺");
        interestType.put("3","公寓");

        refundType = new HashMap<>();
        refundType.put("1", "按揭");
        refundType.put("2", "全款");
    }






}
